{include file="common/header"/}
<div class="lemo-container">
    <div class="lemo-main">
        <fieldset class="layui-elem-field layui-field-title">
            <legend>运营组列表</legend>

            <blockquote class="layui-elem-quote">
                <div class="lemo-table">
                    <!-- <div class="layui-inline">
                        <input type="text" name="keys" id="keys" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">

                    </div>
                    <button class="layui-btn data-add-btn layui-btn-sm" lay-submit="" lay-filter="search" id="search">搜索</button> -->
                    <a data-href='{:url("groupAdd")}' href="javascript:;" class="layui-btn layui-btn-sm layui-btn-warm add">添加组</a>

                </div>

            </blockquote>

        </fieldset>

        <table class="layui-table" id="list" lay-filter="list"></table>
    </div>
</div>
{include file="common/footer"/}

<script type="text/html" id="action">
    <a data-href="{:url('groupEdit')}?id={{d.id}}" class="layui-btn layui-btn-xs" lay-event="edit">{:lang('edit')}</a>

    <a data-href="{:url('groupDel')}" class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">{:lang('del')}</a>
    
</script>

<script>
    var tableIn;
    layui.config({
        base: "/static/admin/js/",
        version: true
    }).extend({
        Admin: 'Admin'
    }).use(['element', 'layer', 'Admin'], function () {
        var $ = layui.jquery,
            form = layui.form,
            table = layui.table;
        tableIn = table.render({
            elem: '#list',
            url: '{:url("groupList")}',
            method:'post',
            title:'{:lang("admin")}{:lang("list")}',
            cols: [[
                {field:'id', title: 'ID', width:60,fixed: true}
                ,{field:'name', title: '组名', width:180}
                ,{field:'group_leader_id', title: '组长id', width:100}
                ,{field:'appid', title: '应用id', width:200}
                ,{field:'key', title: 'key', width:150}
                ,{field:'ip', title: '{:lang("ip")}',width:150,hide:true}
                ,{title:'操作',width:150, toolbar: '#action',align:"center"}
            ]]
        });

    });
</script>
